package com.stagecommon.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.stagecommon.common.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yxl
 * @since 2021-11-09
 */
public interface UserMapper extends BaseMapper<User> {
    //校验用户名密码
    User findByUsernameAndPassword(String username,String password);
    //查询用户名所属信息
    User selectUserInformation(String username);
    //查找用户名所属头像
    User selectUserImg(String username);
    //增加用户名所属需求数
    void incretmentDemandNum(String username);
    //减少用户名所属需求数
    void decretmentDemandNum(String username);

    Long selectPermissionIdByUsername(@Param("username") String username);
    //获取手机号用户信息
    User findByPhone(String phone);

    List<Integer> listRoleId(@Param("userId") Integer userId);
}

